using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.attribute;

namespace Eamon.MeituanDotnetSDK.model.ddzh.tuangou.tuangouReceiptBatchconsume
{
    /// <summary>
    /// 次卡批量验券
    /// </summary>
    [ApiMeta(
        Path = "/ddzh/tuangou/receipt/batchconsume",
        BusinessId = 58,
        ApiVersion = "10038",
        ApiName = "tuangou_receipt_batchconsume",
        NeedAuth = true
    )]
    public class TuangouReceiptBatchconsumeRequest : MeituanRequest<TuangouReceiptBatchconsumeResponse>
    {
        /// <summary>
        /// 请求ID，用于标识幂等性
        /// </summary>
        [Required(ErrorMessage = "requestId不能为空")]
        [JsonPropertyName("requestId")]
        public string RequestId { get; set; }

        /// <summary>
        /// 商家在三方系统登录的帐号，仅用于记录验券者的信息，不用于权限验证
        /// </summary>
        [Required(ErrorMessage = "appShopAccount不能为空")]
        [JsonPropertyName("appShopAccount")]
        public string AppShopAccount { get; set; }

        /// <summary>
        /// 商家在三方系统登录的用户名，仅用于记录验券者的信息，不用于权限验证
        /// </summary>
        [Required(ErrorMessage = "appShopAccountName不能为空")]
        [JsonPropertyName("appShopAccountName")]
        public string AppShopAccountName { get; set; }

        /// <summary>
        /// 券码信息列表
        /// </summary>
        [Required(ErrorMessage = "receiptCodeInfos不能为空")]
        [JsonPropertyName("receiptCodeInfos")]
        public List<ReceiptCodeInfo> ReceiptCodeInfos { get; set; }

        public override string ToString()
        {
            return $"TuangouReceiptBatchconsumeRequest{{RequestId={RequestId}, AppShopAccount={AppShopAccount}, AppShopAccountName={AppShopAccountName}, ReceiptCodeInfos={ReceiptCodeInfos}}}";
        }
    }
}
